/**
 * Snackbars
 * Material design notifications
 * http://www.google.com/design/spec/components/snackbars-toasts.html
 */

$am-snackbar-background: #323232 !default;
$am-snackbar-color: am-color(text-light) !default;
$am-snackbar-min-width: am-unit(36) !default;
$am-snackbar-max-width: am-unit(72) !default;
$am-snackbar-duration: 9s !default;

@keyframes am-snackbar-fade {
  from {
    opacity: 0;
    transform: translate3d(0, 5px, 0);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@mixin am-snackbar {
  animation: 0.6s am-snackbar-fade, 0.6s am-snackbar-fade reverse $am-snackbar-duration forwards;
  background: $am-snackbar-background;
  border-radius: 2px;
  bottom: 0;
  box-shadow: 0 1px 2px rgba(#000, 0.24);
  color: $am-snackbar-color;
  font-weight: 300;
  font-size: 14px;
  line-height: am-sp(20);
  margin: am-unit(2);
  min-width: $am-snackbar-min-width;
  max-width: $am-snackbar-max-width;
  padding: am-unit(2) am-unit(3) am-unit(1.5);
  position: fixed;
  text-shadow: 0 1px 1px #000;
  z-index: $am-elevation-top;
}

@mixin am-snackbar-error {
  background-color: am-darken(error, 25%);
  text-shadow: 0 1px 1px am-darken(error, 65%);
}
